import Vue from 'vue'
import VueRouter from 'vue-router'
import navButton from '../views/navButton.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'navButton',
    redirect:'/Home',
    component: navButton,
    children:[
      {
        path: '/Home',
        name: 'Home',
        component: () => import('../views/home/Home.vue')
      }, {
        path: '/money',
        name: 'money',
        component: () => import('../views/money/index.vue')
      }, {
        path: '/credit',
        name: 'credit',
        component: () => import('../views/credit/index.vue')
      }, {
        path: '/live',
        name: 'live',
        component: () => import('../views/live/index.vue')
      }, {
        path: '/my',
        name: 'my',
        component: () => import('../views/my/index.vue')
      },
    ]
  },
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
